<!DOCTYPE html>
<html>
<head>
<style>
html, body {
    margin: 0;
    padding: 0;
}
.container {
    width: 100px;
    height: 100px;
    background-color: lime;
    position: relative;
}
.scrollbar {
    background-color: rgba(128, 128, 128, 0.5);
    position: absolute;
}
.horizontal {
    width: 17px;
    height: 3px;
}
.vertical {
    width: 3px;
    height: 17px;
}
</style>
<script>
</script>
</head>
<body>
<!--
You should see first 2 green boxes with overlay scrollbars.
The second box should have a scrollbar on the left.
Remaining 2 green boxes should appear without overlay scrollbars.
-->

<div class="container">
<div class="scrollbar vertical" style="right: 4px; top: 4px;"></div>
<div class="scrollbar horizontal" style="left: 4px; bottom: 4px;"></div>
</div>
<div dir="rtl" class="container">
<div class="scrollbar vertical" style="left: 4px; top: 4px;"></div>
<div class="scrollbar horizontal" style="right: 4px; bottom: 4px;"></div>
</div>

<div class="container"></div>
<div dir="rtl" class="container"></div>
</body>
</html>